﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KylinORM.CQRS.Publisher
{
    /// <summary>
    /// 实体操作类型
    /// </summary>
    public class MapperEvent
    {
        private string messageName = string.Empty;
        /// <summary>
        /// 创建实体操作事件
        /// </summary>
        /// <param name="messageName"></param>
        protected MapperEvent(string messageName)
        {
            this.messageName = messageName;
        }
        /// <summary>
        /// 返回事件名称
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return this.messageName;
        }

        /// <summary>
        /// 创建实体
        /// </summary>
        public static MapperEvent EntityCreate = new MapperEvent("EntityCreate");
        /// <summary>
        /// 更新实体
        /// </summary>
        public static MapperEvent EntityUpdate = new MapperEvent("EntityUpdate");
        /// <summary>
        /// 删除实体
        /// </summary>
        public static MapperEvent EntityDelete = new MapperEvent("EntityDelete");

    }
}
